package phoenics.manpads.stinger.model;

import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

/**
 * @author Phoenics Chow
 * on 2019年01月21日
 */
public class ProjectTreeModel implements IModel{
    private static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ProjectTreeModel.class);
    private StringProperty name=new SimpleStringProperty();
    private String funId="";
    private ObjectProperty<Object> data=new SimpleObjectProperty<>();

    @Override
    public void clear() {
        setData(null);
        setName(null);

    }
    public Object getData() {
        return data.get();
    }

    public ObjectProperty<Object> dataProperty() {
        return data;
    }

    public void setData(Object data) {
        this.data.set(data);
    }

    public String getName() {
        return name.get();
    }

    public StringProperty nameProperty() {
        return name;
    }

    public void setName(String name) {
        this.name.set(name);
    }

    @Override
    public String toString() {
        return getName();
    }

    public String getFunId() {
        return funId;
    }

    public void setFunId(String funId) {
        this.funId = funId;
    }
}
